//
//  ZGNavButton.m
//  NewBee
//
//  Created by leergou on 16/8/20.
//  Copyright © 2016年 WhiteHouse. All rights reserved.
//

#import "ZGNavButton.h"

@implementation ZGNavButton

- (instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        
        
        [self.imageView sizeToFit];
        [self.titleLabel sizeToFit];
        
        self.imageView.contentMode = UIViewContentModeCenter;
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        self.titleLabel.font = [UIFont systemFontOfSize:10];
        [self setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        
    }
    
    return self;
}



- (void)layoutSubviews{
    [super layoutSubviews];
    
    self.imageView.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.width);
    self.titleLabel.frame = CGRectMake(0, self.frame.size.width, self.frame.size.width, self.frame.size.height - self.frame.size.width);
}





@end
